package com.zz.tijian.controller;

import com.zz.tijian.entity.Hospital;
import com.zz.tijian.entity.req.HosRequestDto;
import com.zz.tijian.entity.res.Result;
import com.zz.tijian.service.HospitalService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "hospital-医院相关接口")
@RestController
@RequestMapping("/hospital")
@CrossOrigin
public class HospitalController {

    @Autowired
    private HospitalService hospitalService;
    @ApiOperation("获取所有医院")
    @PostMapping("/getAll")
    public Result<List<Hospital>> getAll(@RequestBody HosRequestDto params){
        return hospitalService.search(params);
    }

}
